package com.ygqh.baby.service;

import java.util.List;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.ao.ResultSet;
import com.ygqh.baby.po.AdminPermission;
import com.ygqh.baby.po.AdminRole;
import com.ygqh.baby.po.AdminUser;

public interface AdminUserService {

	List<AdminUser> find();

	int findCount();

	AdminUser findById(Long id);

	int deleteSoft(Long[] ids, String adminUserName);

	int deleteSoft(Long id, String adminUserName);

	int save(AdminUser adminUser);

	int save(AdminUser adminUser, Long[] roleIds);

	int update(AdminUser adminUser);

	int saveOrUpdate(AdminUser adminUser);

	ResultSet<AdminUser> search(QueryInfo queryInfo, String q);

	AdminUser findByUserName(String username);

	/**
	 * 查找菜单通过用户
	 * 
	 * @param userId
	 * @return
	 */
	List<AdminPermission> findMenuByUser(Long userId);

	/**
	 * 查找权限通过用户
	 * 
	 * @param userId
	 * @return
	 */
	List<AdminPermission> findPermissionByUser(Long userId);

	/**
	 * 查找角色通过用户
	 * 
	 * @param userId
	 * @return
	 */
	List<AdminRole> findRolesByUser(Long userId);

}
